<template>
     <!-- 搜索 -->
    <van-search v-model="value" show-action label="地址" placeholder="请输入搜索关键词" @search="onSearch"></van-search>
</template>

<script setup>

    import { useRouter} from 'vue-router'
    const router =useRouter()
    const onSearch=()=>{
        console.log('您触发了回车按钮，触发了点击事件');
        router.push('/search')
    }
</script>

<style lang="scss" scoped>

</style>